<script setup lang="ts" name="XtxBreadcrumb">
import { provide } from 'vue'
/*
provide+inject
使用
  传：1：导入 import {provide} from 'vue'
      2:传递  provide('属性名',属性值)
  收
     1：import {inject} from 'vue'
     2: const 名字=inject('属性名')
*/

const props = defineProps({
  separator: {
    type: String,
    default: ''
  }
})
provide('separator', props.separator)
</script>
<template>
  <div class="xtx-bread">
    <slot></slot>
  </div>
</template>
<style lang="less" scoped>
// deep vue2:  /deep/ >>> ::v-deep   vue3  :deep()
.xtx-bread {
  display: flex;
  padding: 25px 10px;
  :deep(&-item) {
    a {
      color: #666;
      transition: all 0.4s;
      &:hover {
        color: @xtxColor;
      }
    }
  }
  :deep(i) {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
